home *** CD-ROM | disk | FTP | other *** search
/ MacHome 1998 February / MacHome CD-ROM 02-1998.toast / Game Demos / Duke Nukem 3D / Duke Demo Files / Duke3D Group / TYPES.H < prev    next >
C/C++ Source or Header  |  1997-12-03  |  2KB  |  77 lines

  1. #ifndef _types_public
  2. #define _types_public
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6.  
  7.  
  8. //***************************************************************************
  9. //
  10. //  Global Data Types (For portability)
  11. //
  12. //***************************************************************************
  13.  
  14. typedef unsigned char           uint8;
  15. typedef uint8                   byte;
  16. typedef signed char             int8;
  17.  
  18. typedef unsigned short int      uint16;
  19. typedef uint16                  word;
  20. typedef short int               int16;
  21.  
  22. typedef unsigned long           uint32;
  23. typedef long                    int32;
  24. typedef uint32                  dword;
  25.  
  26. typedef int32                   fixed;
  27. typedef int32                   boolean;
  28. typedef float                   float32;
  29. typedef double                  float64;
  30. typedef long double             float128;
  31. typedef float64                 appfloat;
  32.  
  33. #define MAXINT32                0x7fffffff
  34. #define MININT32                -0x80000000
  35. #define MAXUINT32               0xffffffff
  36. #define MINUINT32               0
  37.  
  38. #define MAXINT16                0x7fff
  39. #define MININT16                -0x8000
  40. #define MAXUINT16               0xffff
  41. #define MINUINT16               0
  42.  
  43. //***************************************************************************
  44. //
  45. //  boolean values
  46. //
  47. //***************************************************************************
  48.  
  49. #define true ( 1 == 1 )
  50. #define false ( ! true )
  51.  
  52. //***************************************************************************
  53. //
  54. //  BYTE ACCESS MACROS
  55. //
  56. //***************************************************************************
  57.  
  58. // WORD macros
  59. #define Int16_HighByte( x ) ( (uint8) ((x)>>8) )
  60. #define Int16_LowByte( x )  ( (uint8) ((x)&0xff) )
  61.  
  62. // DWORD macros
  63. #define Int32_4Byte( x )   ( (uint8) ((x)>>24)&0xff )
  64. #define Int32_3Byte( x )   ( (uint8) (((x)>>16)&0xff) )
  65. #define Int32_2Byte( x )   ( (uint8) (((x)>>8)&0xff) )
  66. #define Int32_1Byte( x )   ( (uint8) ((x)&0xff) )
  67.  
  68. #ifdef __NeXT__
  69. #define stricmp strcasecmp
  70. #define strcmpi strcasecmp
  71. #endif
  72.  
  73. #ifdef __cplusplus
  74. };
  75. #endif
  76. #endif
  77.